<template>
	<view class="header">
		<view style="background-color: #fff;" class="flex flex-ai-c search">
			<view style="width: 600rpx;margin-left: 24rpx;">
				<u-search height="66" @change="changes" v-model="keyword" placeholder="输入姓名/手机号进行搜索" :show-action="false" @search="search"></u-search>
			</view>
			<view class="texts" @click="textSearch">搜索</view>
		</view>
		<!-- 卡片 客户数 -->
		<view class="card">
			<view class="card-number">
				<view class="num">{{total}}</view>
				<view class="text">总客户数</view>
			</view>
		</view>

		<!-- <view class="tab">
			<view style="border-bottom: 5rpx solid #EEEEEE;">
				<u-tabs :list="list" bar-width="90" active-color='#FBB000' :is-scroll="false" :current="current" @change="change" />
			</view>
		</view> -->
		<view class="card2" v-for="(item,indnx) in list2" :key='item.uid'>
			<!-- list -->
				<view class="list">
					<!-- 头部信息 -->
					<view class="flex flex-jc-sb flex-ai-c info">
						<view class="flex flex-ai-c">
							<view class="name">{{item.uname}}</view>
							<view class="doorman" v-if="item.newCustomers">新客</view>
						</view>
						<view class="look" @click="goPage(item)">
							查看详情
							<u-icon name="arrow-right" color="#999999" size="23rpx"></u-icon>
						</view>
					</view>

					<!-- 金额次数 -->
					<view class="total">
						<view class="flex flex-jc-sa total-frequency">
							<view>
								<view class="price">{{item.consumptionCount}}</view>
								<view>消费次数</view>
							</view>
							<view>
								<view class="price">{{item.totalAmount}}</view>
								<view>消费总金额</view>
							</view>
						</view>
						<view style="padding:24rpx 26rpx;">
							<view class="time">最近消费时间：{{returnTime(item.newTime)}}</view>
							<view class="flex return" v-show='false'>
								<view class="time">回访：2020-09-15 12:59</view>
								<view class="success">回访成功</view>
							</view>
						</view>

					</view>
				</view>
		</view>
		<u-loadmore :status="loadStatus" @loadmore="more"/>
	</view>
</template>

<script src='./archives.js'></script>

<style lang="scss">
	@import './archives.scss';
</style>
